package com.punch.common.vo.course.classes;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.punch.common.enums.course.GradeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * ClassVO-班级信息 表单
 *
 * @author xiaol
 * @version 1.0.0
 * @since 2020/7/21
 */
@Data
public class ClassVO implements Serializable {

    /**
     * 班级id
     */
    @ApiModelProperty(name = "classId", notes = "班级id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long classId;

    /**
     * 0-机构 1-班级
     */
    @ApiModelProperty(name = "type", notes = "0-机构 1-班级")
    private Integer type;

    /**
     * 班级名称
     */
    @ApiModelProperty(name = "className", notes = "班级名称")
    private String className;

    /**
     * 开班日期
     */
    @ApiModelProperty(name = "planOpenDate", notes = "开班日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private LocalDate planOpenDate;



    /**
     * 报名开始时间
     */
    @ApiModelProperty(name = "signUpStartTime", notes = "报名开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private LocalDateTime signUpStartTime;

    /**
     * 报名结束时间
     */
    @ApiModelProperty(name = "signUpEndTime", notes = "报名结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private LocalDateTime signUpEndTime;

    /**
     * 对应的课程id   单选
     */
    @ApiModelProperty(name = "courseId", notes = "对应的课程id   单选")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long courseId;


    /**
     * 课程创建者姓名
     */
    @ApiModelProperty(name = "courseCreateName", notes = "课程创建者姓名")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String courseCreateName;

    /**
     * 对应的课程name  单选
     */
    @ApiModelProperty(name = "courseName", notes = "对应的课程名称   单选")
    private String courseName;
    /**
     * /**
     * 适用年级  同课程适用年级 1-6年级多选
     * {@link GradeEnum}
     */
    @ApiModelProperty(name = "courseGrade", notes = "课程适用年级名称  1-6年级多选")
    private List<Integer> courseGrade;

    /**
     * /**
     * 适用年级  同课程适用年级 1-6年级多选
     * {@link GradeEnum}
     */
    @ApiModelProperty(name = "courseGradeName", notes = "课程适用年级名称  1-6年级多选")
    private List<String> courseGradeName;

    /**
     * 上课周期
     */
    @ApiModelProperty(name = "courseWeek", notes = "上课周期：星期几，多选")
    private List<Integer> courseWeek;

    /**
     * 上课周期名称
     */
    @ApiModelProperty(name = "courseWeekName", notes = "上课周期：星期几，多选")
    private List<String> courseWeekName;

    /**
     * 课时数
     */
    @ApiModelProperty(name = "courseHourCount", notes = "课时数")
    private Integer courseHourCount;
    /**
     * 上课时间
     */
    @ApiModelProperty(name = "classTime", notes = "上课时间")
    private String classTime;

    /**
     * 课时单价：单位元，精度两位小数
     */
    @ApiModelProperty(name = "courseHourPriceShow", notes = "课时单价：单位元，精度两位小数,显示价格")
    private BigDecimal courseHourPriceShow;

    /**
     * 是否包含教材/教具：勾选框，默认否  0否  1是
     */
    @ApiModelProperty(name = "goodsFlag", notes = "是否包含教材/教具：勾选框，默认否  0否  1是")
    private Integer goodsFlag;

    /**
     * 商品id
     */
    @ApiModelProperty(name = "goodsId", notes = "商品id")
    @JsonSerialize(using = ToStringSerializer.class)
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long goodsId;
    /**
     * 教材名称/教具名称
     */
    @ApiModelProperty(name = "goodsName", notes = "商品名称")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String goodsName;

    /**
     * 教材/教具单价
     */
    @ApiModelProperty(name = "goodsPrice", notes = "商品单价")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private BigDecimal goodsPriceShow;

    /**
     * 是否必须购买：勾选框，默认否    0否  1是
     */
    @ApiModelProperty(name = "buyFlag", notes = "是否必须购买：勾选框，默认否    0否  1是")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Integer buyFlag;

    /**
     * 上课教室id  单选非禁用教室
     */
    @ApiModelProperty(name = "classRoomId", notes = "上课教室id  单选非禁用教室")
    @JsonSerialize(using = ToStringSerializer.class)
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long classRoomId;

    /**
     * 上课教室名称
     */
    @ApiModelProperty(name = "classRoomName", notes = "上课教室名称")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String classRoomName;

    /**
     * 最少上课人数
     */
    @ApiModelProperty(name = "stuNoMin", notes = "最少上课人数")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Integer stuNoMin;
    /**
     * 最多上课人数
     */
    @ApiModelProperty(name = "stuNoMax", notes = "最多上课人数")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Integer stuNoMax;

    /**
     * 上课老师id
     */
    @ApiModelProperty(name = "teacherId", notes = "上课老师id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long teacherId;

    /**
     * 上课老师名称
     */
    @ApiModelProperty(name = "teacherName", notes = "上课老师名称")
    private String teacherName;

    /**
     * 机构id
     */
    @ApiModelProperty(name = "organId", notes = "课程的机构id,有可能为0")
    @JsonSerialize(using = ToStringSerializer.class)
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long organId;

    /**
     * 机构id
     */
    @ApiModelProperty(name = "orgNo", notes = "课程的机构id,有可能为''")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String orgNo;

    @ApiModelProperty(name = "schoolName", notes = "学校名称")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String schoolName;

    private Integer teacherUpdateFlag;

}
